package com.zrrd.reggie.common;

public class ThreadLocalUtil {
    //创建线程变量对象
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    //存入
    public static  void setCurrentId(Long empId){
        threadLocal.set(empId);
    }


    //获取
    public static Long getCurrentId(){
        //这里决定了它只有一个内容
        return threadLocal.get();
    }



}
